define("BLOG_DIR", "/var/www/ycaster/day_by_day/"); $year=htmlspecialchars($_GET["year"]); $month=htmlspecialchars($_GET["month"]); $caldir="calendar/".$year."/".$month."/index.html"; if(!is_file(BLOG_DIR.$caldir)) { require_once(BLOG_DIR . "php_calendar.php"); //pre_next $pre_year = date("y", mktime(0, 0, 0, $month - 1, 1, $year)); $pre_month = date("m", mktime(0, 0, 0, $month - 1, 1, $year)); $next_year = date("y", mktime(0, 0, 0, $month + 1, 1, $year)); $next_month = date("m", mktime(0, 0, 0, $month + 1, 1, $year)); //today $days=array(); if (date("y")==$year && date("m")==$month){ $days[date('j')]=array(NULL,NULL,'